package com.river.boot.biz.service;

import com.river.boot.biz.model.entity.ProductSpecOption;
import com.river.boot.biz.model.form.ProductSpecOptionForm;
import com.river.boot.biz.model.query.ProductSpecOptionQuery;
import com.river.boot.biz.model.vo.ProductSpecOptionVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 规格选项服务类
 *
 * @author JiangCheng Xiang
 * @since 2025-04-25 15:57
 */
public interface ProductSpecOptionService extends IService<ProductSpecOption> {

    /**
     *规格选项分页列表
     *
     * @return
     */
    IPage<ProductSpecOptionVO> getProductSpecOptionPage(ProductSpecOptionQuery queryParams);

    /**
     * 获取规格选项表单数据
     *
     * @param id 规格选项ID
     * @return
     */
     ProductSpecOptionForm getProductSpecOptionFormData(Long id);

    /**
     * 新增规格选项
     *
     * @param formData 规格选项表单对象
     * @return
     */
    boolean saveProductSpecOption(ProductSpecOptionForm formData);

    /**
     * 修改规格选项
     *
     * @param id   规格选项ID
     * @param formData 规格选项表单对象
     * @return
     */
    boolean updateProductSpecOption(Long id, ProductSpecOptionForm formData);

    /**
     * 删除规格选项
     *
     * @param ids 规格选项ID，多个以英文逗号(,)分割
     * @return
     */
    boolean deleteProductSpecOptions(String ids);

    List<ProductSpecOptionForm> getProductSpecOptionsByProductId(Long productId);

    void deleteProductSpecOptionsByProductId(Long productId);
}
